﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="uploadFile.aspx.cs" Inherits="AcctrueWMS.Web.UploadFiles.uploadFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script>
    function UploadComplete() {
        alert("上传成功！");
        location.href = location.href;
    }


</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="res/scripts/JQuery/jquery-1.5.1.js" type="text/javascript"></script>
    <script src="res/scripts/common.js" type="text/javascript"></script>
    <script src="res/scripts/commonPaging.js" type="text/javascript"></script>
    <link href="res/styles/css/right.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (Request.QueryString["opt"] == "view"){%>
        <div style="height:400px;overflow-x: auto; overflow-y: scroll; border-style:solid; border-width:2px; border-color:rgb(58,105,161); margin:5px; ">        
            <asp:Repeater ID="rptFileListView" runat="server" >
            <HeaderTemplate>
            <table id="tblFileList" class="tblList" style=" width:95%">
            <tr>
                <th>文件名</th>
                <th>操作</th>
            </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <a href='javascript:void(0)' onclick="wmsCommon.downFile('<%#(string)Eval("filePath") %>')"><%# Eval("fileName")%></a>
                    </td>
                    <td style="width:120px; text-align:center">
                        <a href='javascript:void(0)' onclick="wmsCommon.downFile('<%#(string)Eval("filePath") %>')">下载</a>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
            </table>
            </FooterTemplate>
            </asp:Repeater>
        </div>
    <%}else{%>
        <div style="height:200px;overflow-x: auto; overflow-y: scroll; border-style:solid; border-width:2px; border-color:rgb(58,105,161); margin:5px; ">        
            <asp:Repeater ID="rptFileList" runat="server" >
            <HeaderTemplate>
            <table id="tblFileList" class="tblList" style=" width:95%">
            <tr>
                <th>文件名</th>
                <th>操作</th>
            </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <a href='javascript:void(0)' onclick="wmsCommon.downFile('<%#(string)Eval("filePath") %>')"><%# Eval("fileName")%></a>
                    </td>
                    <td style="width:120px; text-align:center">
                        <a href='javascript:void(0)' onclick="wmsCommon.delFile(this,'<%#Eval("filePath") %>')">删除</a>
                        &nbsp;
                        <a href='javascript:void(0)' onclick="wmsCommon.downFile('<%#(string)Eval("filePath") %>')">下载</a>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
            </table>
            </FooterTemplate>
            </asp:Repeater>
        </div>
        <div style="height:200px;overflow-x: auto; overflow-y: scroll; border-style:solid; border-width:2px; border-color:rgb(58,105,161); margin:5px; ">
         <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
         codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
          width="100%" height="375" id="fileUpload" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="movie" value="<%=flashPath %>" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent"/>
          <param name=FlashVars value='&completeFunction=UploadComplete()&fileTypes=<%=uploadFileType %>&fileTypeDescription=所有文件&totalUploadSize=<%=uploadFileTotalSize %>&fileSizeLimit=<%=uploadFileSize %>&uploadPage=<%= uploadPage %>'/>
          </object>
        </div>
    <%} %>
    </form>
</body>
</html>
